<style>
.fui-number .minus:before, .fui-number .plus:before {
	border-left: 0 solid #d9d9d9;
}
.fui-number .minus:after, .fui-number .plus:after {
	border-right: 0 solid #d9d9d9;
}
.fui-number:before {
	border-top: 0 solid #d9d9d9;
}
.fui-number:after {border-top: 0 solid #d9d9d9;}
.fui-number .num {
	color:#666;
}
.fui-number .num {
	color:#666;
}
.fui-number.small {
	height: 1.2rem;
	line-height: 1.2rem;
}
.fui-number .minus, .fui-number .plus {
	z-index:0;
}
.fui-number.small .minus{
	color: {{main.syscolor || '#63BE72'}};
	padding-top:1px;
	border: 1px solid {{main.syscolor || '#63BE72'}};
	border-radius:50%;
}
 .fui-number.small .plus {
	color: #fff;
	padding-top:1px;
	background: {{main.syscolor || '#63BE72'}};
	border: 1px solid {{main.syscolor || '#63BE72'}};
	border-radius:50%;
}
.fui-navbar .buybtn  {padding-left:0.2rem;background:#fff}
.fee-tag-nav, .fee-tagup-nav, .fee-disabled-nav {border-radius:1rem;height:2rem;line-height:2rem;color:#fff;width:auto;font-weight:400;font-size:0.75rem;margin:0.2rem 0;padding: 0 0.5rem}
.fee-tagup {background:#25c376;color:#fff;width:auto;font-weight:400;font-size:0.6rem}
.fee-tag-nav {background:#25c376;}
.fee-tagup-nav {background:#25c376;}
</style>
<div ng-if="pagedata.showfuwu" class="popup">
	<div class="popup-body">
		<div class="popup-bottom" style="background:#f2f2f2;padding-bottom:3.5rem">
			<i class="closed icon icon-cuowu" style="top:-2.5rem" ng-click="pagedata.showfuwu=false"></i>
			<div class="jy-content">
			<div class="fui-cell-group radius" style="border: 3px solid #25c376;">
            <div class="fui-cell" style="padding:0.5rem 0.35rem;">
                <div class="fui-cell-label" style="width:auto;padding-right:0.4rem">
                    <div style="width:3.5rem;margin:0 auto">
					<img class="round" style="border-radius:50%;height:3.5rem;width:3.5rem" ng-src="{{tomedia(pagedata.worker.avatar) || '../addons/jy_djhome/resource/images/xm.png'}}">
					</div>
                </div>
                <div class="fui-cell-text" style="margin-top:0">
                    <div class="title" style="font-size:0.75rem">
						<span class="bold">{{pagedata.worker.name}}<span>
						<span class="r-f">
						<i class="icon icon-shoucang-tianchong orange" style="font-size: 0.6rem;"></i>
						<span class="orange" style="font-size: 0.6rem;">{{pagedata.worker.star||5}}<span>
						<span>
					</div>
                    <div class="gray" style="margin-top:0.2rem;font-size:0.6rem">
						已服务：{{pagedata.worker.salenum||0}}单
					</div>
					<div class="gray" style="margin-top:0.3rem;height:auto;font-size:0.6rem">
						<i class="icon icon-dianpu" style="font-size: 0.6rem;"></i>
						<span>小微商户</span>
						<i class="icon icon-xiaoxi1" style="font-size: 0.6rem;"></i>
						<span>{{pagedata.worker.pingjia||0}}</span>
						<i class="icon icon-zidingyileimu" style="font-size: 0.6rem;"></i>
						<span>{{pagedata.worker.likes||0}}</span>
					</div>
                </div>
			</div>
			</div>
			<div class="fui-cell-group radius" ng-repeat="item in pagedata.fuwus">
				<div class="fui-cell" style="padding:0.5rem 0.35rem">
					<div class="fui-cell-label"style="width:auto;padding-right:0.2rem">
						<div style="width:4.5rem;margin:0 auto">
						<img class="round" style="border-radius:0.2rem;height:3.5rem;width:4.5rem" ng-src="{{tomedia(item.image) || '../addons/jy_djhome/resource/images/xm.png'}}">
						</div>
					</div>
					<div class="fui-cell-text" style="margin-top:0">
						<div class="title bold" style="font-size:0.75rem">{{item.title}}</div>
						<div class="gray" style="margin-top:0.6rem;height:auto;font-size:0.5rem">
							<span style="color:red">
							<span style="font-size:0.8rem">{{item.price}}</span>元/次
							</span>
							<i class="icon icon-shijian syscolor" style="font-size:0.6rem;padding-left:0.2rem"></i>
							<span>{{item.times}}分钟</span>
						</div>
					</div>
					<div class="fui-cell-remark noremark">
						<div class="fui-number small" style="right:0">
							<div class="minus" ng-click="pagedata.minus(item.id,$index)"><i class="icon icon-subtract" style="font-size:0.7rem"></i></div>
							{{pagedata.worker.goods[item.id].total||0}}
							<div class="plus" ng-click="pagedata.plus(item.id,item)"><i class="icon icon-tianjia" style="font-size:0.7rem"></i></div>
						</div>
					</div>
				</div>
			</div>
			</div>
			<div class="fui-navbar order-create-checkout">
				<a href="javascript:;" class="nav-item total" style="text-align:left;padding-left:0.5rem">
					<span  class="text-danger bigprice">&yen; 
						<span class="totalprice syscolor" style="font-size:1.2rem">{{price(pagedata.worker.totalprice) || '0.00'}}</span>
					</span>
				</a>
				<a href="javascript:;" class="nav-item btn btn-danger buybtn" ng-click="pagedata.check_buy();" >
					<div class="fee-tagup-nav">
						提交提交
					</div>
				</a>
			</div>
		</div>
	</div>
</div>
<script>
scope.pagedata.worker={'goods':[]};
//减少
scope.pagedata.minus=function(goodsid,index){
	var g = scope.pagedata.worker.goods[goodsid]
	if(g.total<=0){
		return false;
	}
	g.total--;
	scope.pagedata.worker.totalprice -=g.price*1;
	if(g.total<=0){
	}
	scope.pagedata.worker.goods[goodsid]=g;
	scope.$evalAsync();
}
//增加
scope.pagedata.plus=function(goodsid,nowgoods){
	scope.pagedata.worker.goods=scope.pagedata.worker.goods?scope.pagedata.worker.goods:{}
	var g = scope.pagedata.worker.goods[goodsid]
	console.log(goodsid);
	if(!g){
		g={
			'title':nowgoods.title,
			'image':nowgoods.image,
			'id':nowgoods.id,
			'price':nowgoods.price,
			'times':nowgoods.times,
			'total':1
		};
	}else{
		g.total++;
	}
	scope.pagedata.worker.totalprice=scope.pagedata.worker.totalprice?scope.pagedata.worker.totalprice:0;
	scope.pagedata.worker.totalprice +=g.price*1;
	console.log(scope.pagedata.worker.totalprice);
	scope.pagedata.worker.goods[goodsid]=g;
	scope.$evalAsync();
}
scope.pagedata.check_buy=function(){
	scope.post_json('jy_djhome/list/check_buy/',scope.pagedata.worker,function(resurl){
		scope.access_json(resurl);
	});
}
</script>